<?php
include("include/conn.php");
require('include/Smarty/libs/Smarty.class.php');

$voucherArray = array();

$selectVoucher = "SELECT javakvoucherId,billNo,DATE_FORMAT(date,'%d-%m-%Y')AS date,partyName,silverKg,dagina
                    FROM javakvoucherom
                   WHERE javakvoucherId = ".$_GET['javakvoucherId']; 
$voucherRes = mysql_query($selectVoucher);
$a = 0;
while($voucherRow = mysql_fetch_assoc($voucherRes))
{
	$voucherArray[$a]['javakvoucherId'] = $voucherRow['javakvoucherId'];
	$voucherArray[$a]['billNo']         = $voucherRow['billNo'];
	$voucherArray[$a]['date']           = $voucherRow['date'];
	$voucherArray[$a]['partyName']      = $voucherRow['partyName'];
	$voucherArray[$a]['silverKg']       = $voucherRow['silverKg'];
	$voucherArray[$a]['dagina']       = $voucherRow['dagina'];
	$a++;
}
$smarty = new Smarty;
require("bottom.php");

$smarty->assign("voucherArray",$voucherArray);
$smarty->display("javakVoucherPrintOm.tpl");
?>